﻿@namespace LaserMark.Components

<div class="show_layout row mt-3">
    @if (Order1 != null)
    {
        <div class="row mt-2" style="width:908px;overflow-x:scroll;margin:10px">
            <div class="col-12 d-flex">
                @foreach (var item in Order1)
                {
                    <div class="d-flex flex-column">
                        <Tag Color="Color.Primary" style="margin:5px">@(!string.IsNullOrEmpty(item) ? item : "空")</Tag>
                        <span class="text-center">@Index</span>
                    </div>
                    Index++;
                }
            </div>
        </div>
    }
</div>


@code {

    [Parameter]
    [NotNull]
    public string[]? Order { get; set; }

    private int Index { get; set; }

    private string[]? Order1 { get; set; }

    protected override void OnParametersSet()
    {
        base.OnParametersSet();
        Order1 = Order;
        Index = 0;
    }
}
